# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: team/gnome <ablocorrea@hotmail.com>
pkgname=gnome-settings-daemon
pkgver=45.1
pkgrel=0
pkgdesc="GNOME settings daemon"
url="https://gitlab.gnome.org/GNOME/gnome-settings-daemon"
arch="all"
options="!check" # tests fail on builders
license="GPL-2.0-only AND LGPL-2.1-only"
depends="pulseaudio"
depends_dev="
	alsa-lib-dev
	colord-dev
	cups-dev
	geoclue-dev
	geocode-glib-dev>=3.26.4-r1
	libcanberra-dev
	libgweather4-dev
	libnotify-dev
	libwacom-dev
	modemmanager-dev
	networkmanager-dev
	pango-dev
	polkit-dev
	pulseaudio-dev
	upower-dev
	"
makedepends="
	$depends_dev
	gcr4-dev
	glib-dev
	gnome-desktop-dev
	gsettings-desktop-schemas-dev
	gtk+3.0-dev
	libxml2-utils
	meson
	"
checkdepends="
	gnome-session
	gnome-shell
	py3-dbusmock
	py3-gobject3
	umockdev-dev
	"
subpackages="$pkgname-dev $pkgname-lang"
source="https://download.gnome.org/sources/gnome-settings-daemon/${pkgver%.*}/gnome-settings-daemon-$pkgver.tar.xz
	338.patch
	dont-use-logind-for-brightness-changing.patch
	"

build() {
	abuild-meson \
		-Db_lto=true \
		-Dsystemd=false \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
ccec193f3f2acdfb5eefda697d6ef2ac0edca18e85d934a83cc34fd5af6c78c56469ffeebbd1c64e8c392462686663c2dd55000bc962beac472580fdfa0717a8  gnome-settings-daemon-45.1.tar.xz
00773925fd5d7f92d567ab77392ab67f37d2633b63da1e338cd0c721030c46cc804e19e45ce59939f454cb31a63e762b622a405394cd61a5c3cb2d40e473301b  338.patch
fd80b939a14bbc5dd502afda0bc6511f2d9c045018680e5ae7fbec32efadb564c5060ec91d374330f246d70571aad5979ce8c175175a29b5ccec3443c8286dc6  dont-use-logind-for-brightness-changing.patch
"
